package com.test.demo;

public class Movie {
    //封装电影数据
    private int id;
    private String name;
    private double price;
    private String director;

    //定义一个无参数构造器
    public Movie() {
    }

    //定义一个有参数构造器
    public Movie(int id, String name, double price, String director) {
        this.id = id;
        this.name = name;
        this.price = price;
        this.director = director;
    }

    //右键->Generate->Getter and Setter->Select All->OK，生成全部属性的Getter和Setter方法
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public String getDirector() {
        return director;
    }

    public void setDirector(String director) {
        this.director = director;
    }
}
